Integrand size = 21, antiderivative size = 128 \[ \int \tan (c+d x) (a+b \tan (c+d x))^{3/2} \, dx=-\frac {(a-i b)^{3/2} \text {arctanh}\left (\frac {\sqrt {a+b \tan (c+d x)}}{\sqrt {a-i b}}\right )}{d}-\frac {(a+i b)^{3/2} \text {arctanh}\left (\frac {\sqrt {a+b \tan (c+d x)}}{\sqrt {a+i b}}\right )}{d}+\frac {2 a \sqrt {a+b \tan (c+d x)}}{d}+\frac {2 (a+b \tan (c+d x))^{3/2}}{3 d} \]
[Out]
Time = 0.28 (sec) , antiderivative size = 128, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.238, Rules used = {3609, 3620, 3618, 65, 214} \[ \int \tan (c+d x) (a+b \tan (c+d x))^{3/2} \, dx=-\frac {(a-i b)^{3/2} \text {arctanh}\left (\frac {\sqrt {a+b \tan (c+d x)}}{\sqrt {a-i b}}\right )}{d}-\frac {(a+i b)^{3/2} \text {arctanh}\left (\frac {\sqrt {a+b \tan (c+d x)}}{\sqrt {a+i b}}\right )}{d}+\frac {2 (a+b \tan (c+d x))^{3/2}}{3 d}+\frac {2 a \sqrt {a+b \tan (c+d x)}}{d} \]
[In]
[Out]
Rule 65
Rule 214
Rule 3609
Rule 3618
Rule 3620
Rubi steps \begin{align*} \text {integral}& = \frac {2 (a+b \tan (c+d x))^{3/2}}{3 d}+\int (-b+a \tan (c+d x)) \sqrt {a+b \tan (c+d x)} \, dx \\ & = \frac {2 a \sqrt {a+b \tan (c+d x)}}{d}+\frac {2 (a+b \tan (c+d x))^{3/2}}{3 d}+\int \frac {-2 a b+\left (a^2-b^2\right ) \tan (c+d x)}{\sqrt {a+b \tan (c+d x)}} \, dx \\ & = \frac {2 a \sqrt {a+b \tan (c+d x)}}{d}+\frac {2 (a+b \tan (c+d x))^{3/2}}{3 d}-\frac {1}{2} \left (i (a-i b)^2\right ) \int \frac {1+i \tan (c+d x)}{\sqrt {a+b \tan (c+d x)}} \, dx+\frac {1}{2} \left (i (a+i b)^2\right ) \int \frac {1-i \tan (c+d x)}{\sqrt {a+b \tan (c+d x)}} \, dx \\ & = \frac {2 a \sqrt {a+b \tan (c+d x)}}{d}+\frac {2 (a+b \tan (c+d x))^{3/2}}{3 d}+\frac {(a-i b)^2 \text {Subst}\left (\int \frac {1}{(-1+x) \sqrt {a-i b x}} \, dx,x,i \tan (c+d x)\right )}{2 d}+\frac {(a+i b)^2 \text {Subst}\left (\int \frac {1}{(-1+x) \sqrt {a+i b x}} \, dx,x,-i \tan (c+d x)\right )}{2 d} \\ & = \frac {2 a \sqrt {a+b \tan (c+d x)}}{d}+\frac {2 (a+b \tan (c+d x))^{3/2}}{3 d}+\frac {\left (i (a-i b)^2\right ) \text {Subst}\left (\int \frac {1}{-1-\frac {i a}{b}+\frac {i x^2}{b}} \, dx,x,\sqrt {a+b \tan (c+d x)}\right )}{b d}-\frac {\left (i (a+i b)^2\right ) \text {Subst}\left (\int \frac {1}{-1+\frac {i a}{b}-\frac {i x^2}{b}} \, dx,x,\sqrt {a+b \tan (c+d x)}\right )}{b d} \\ & = -\frac {(a-i b)^{3/2} \text {arctanh}\left (\frac {\sqrt {a+b \tan (c+d x)}}{\sqrt {a-i b}}\right )}{d}-\frac {(a+i b)^{3/2} \text {arctanh}\left (\frac {\sqrt {a+b \tan (c+d x)}}{\sqrt {a+i b}}\right )}{d}+\frac {2 a \sqrt {a+b \tan (c+d x)}}{d}+\frac {2 (a+b \tan (c+d x))^{3/2}}{3 d} \\ \end{align*}
Time = 0.34 (sec) , antiderivative size = 116, normalized size of antiderivative = 0.91 \[ \int \tan (c+d x) (a+b \tan (c+d x))^{3/2} \, dx=\frac {-3 (a-i b)^{3/2} \text {arctanh}\left (\frac {\sqrt {a+b \tan (c+d x)}}{\sqrt {a-i b}}\right )-3 (a+i b)^{3/2} \text {arctanh}\left (\frac {\sqrt {a+b \tan (c+d x)}}{\sqrt {a+i b}}\right )+2 \sqrt {a+b \tan (c+d x)} (4 a+b \tan (c+d x))}{3 d} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. \(830\) vs. \(2(106)=212\).
Time = 0.34 (sec) , antiderivative size = 831, normalized size of antiderivative = 6.49
method | result | size |
derivativedivides | \(\frac {2 \left (a +b \tan \left (d x +c \right )\right )^{\frac {3}{2}}}{3 d}+\frac {2 a \sqrt {a +b \tan \left (d x +c \right )}}{d}-\frac {\ln \left (\sqrt {a +b \tan \left (d x +c \right )}\, \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}-b \tan \left (d x +c \right )-a -\sqrt {a^{2}+b^{2}}\right ) \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, \sqrt {a^{2}+b^{2}}}{4 d}+\frac {\ln \left (\sqrt {a +b \tan \left (d x +c \right )}\, \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}-b \tan \left (d x +c \right )-a -\sqrt {a^{2}+b^{2}}\right ) \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, a}{2 d}+\frac {\arctan \left (\frac {\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}-2 \sqrt {a +b \tan \left (d x +c \right )}}{\sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}\right ) \sqrt {a^{2}+b^{2}}\, a}{d \sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}+\frac {\arctan \left (\frac {\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}-2 \sqrt {a +b \tan \left (d x +c \right )}}{\sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}\right ) \left (a^{2}+b^{2}\right )}{d \sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}-\frac {2 \arctan \left (\frac {\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}-2 \sqrt {a +b \tan \left (d x +c \right )}}{\sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}\right ) a^{2}}{d \sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}+\frac {\ln \left (b \tan \left (d x +c \right )+a +\sqrt {a +b \tan \left (d x +c \right )}\, \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}+\sqrt {a^{2}+b^{2}}\right ) \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, \sqrt {a^{2}+b^{2}}}{4 d}-\frac {\ln \left (b \tan \left (d x +c \right )+a +\sqrt {a +b \tan \left (d x +c \right )}\, \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}+\sqrt {a^{2}+b^{2}}\right ) \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, a}{2 d}-\frac {\arctan \left (\frac {2 \sqrt {a +b \tan \left (d x +c \right )}+\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}}{\sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}\right ) \sqrt {a^{2}+b^{2}}\, a}{d \sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}-\frac {\arctan \left (\frac {2 \sqrt {a +b \tan \left (d x +c \right )}+\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}}{\sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}\right ) \left (a^{2}+b^{2}\right )}{d \sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}+\frac {2 \arctan \left (\frac {2 \sqrt {a +b \tan \left (d x +c \right )}+\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}}{\sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}\right ) a^{2}}{d \sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}\) | \(831\) |
default | \(\frac {2 \left (a +b \tan \left (d x +c \right )\right )^{\frac {3}{2}}}{3 d}+\frac {2 a \sqrt {a +b \tan \left (d x +c \right )}}{d}-\frac {\ln \left (\sqrt {a +b \tan \left (d x +c \right )}\, \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}-b \tan \left (d x +c \right )-a -\sqrt {a^{2}+b^{2}}\right ) \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, \sqrt {a^{2}+b^{2}}}{4 d}+\frac {\ln \left (\sqrt {a +b \tan \left (d x +c \right )}\, \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}-b \tan \left (d x +c \right )-a -\sqrt {a^{2}+b^{2}}\right ) \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, a}{2 d}+\frac {\arctan \left (\frac {\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}-2 \sqrt {a +b \tan \left (d x +c \right )}}{\sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}\right ) \sqrt {a^{2}+b^{2}}\, a}{d \sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}+\frac {\arctan \left (\frac {\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}-2 \sqrt {a +b \tan \left (d x +c \right )}}{\sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}\right ) \left (a^{2}+b^{2}\right )}{d \sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}-\frac {2 \arctan \left (\frac {\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}-2 \sqrt {a +b \tan \left (d x +c \right )}}{\sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}\right ) a^{2}}{d \sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}+\frac {\ln \left (b \tan \left (d x +c \right )+a +\sqrt {a +b \tan \left (d x +c \right )}\, \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}+\sqrt {a^{2}+b^{2}}\right ) \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, \sqrt {a^{2}+b^{2}}}{4 d}-\frac {\ln \left (b \tan \left (d x +c \right )+a +\sqrt {a +b \tan \left (d x +c \right )}\, \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}+\sqrt {a^{2}+b^{2}}\right ) \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, a}{2 d}-\frac {\arctan \left (\frac {2 \sqrt {a +b \tan \left (d x +c \right )}+\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}}{\sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}\right ) \sqrt {a^{2}+b^{2}}\, a}{d \sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}-\frac {\arctan \left (\frac {2 \sqrt {a +b \tan \left (d x +c \right )}+\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}}{\sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}\right ) \left (a^{2}+b^{2}\right )}{d \sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}+\frac {2 \arctan \left (\frac {2 \sqrt {a +b \tan \left (d x +c \right )}+\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}}{\sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}\right ) a^{2}}{d \sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}\) | \(831\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 756 vs. \(2 (102) = 204\).
Time = 0.25 (sec) , antiderivative size = 756, normalized size of antiderivative = 5.91 \[ \int \tan (c+d x) (a+b \tan (c+d x))^{3/2} \, dx=-\frac {3 \, d \sqrt {\frac {a^{3} - 3 \, a b^{2} + d^{2} \sqrt {-\frac {9 \, a^{4} b^{2} - 6 \, a^{2} b^{4} + b^{6}}{d^{4}}}}{d^{2}}} \log \left (-{\left (3 \, a^{4} + 2 \, a^{2} b^{2} - b^{4}\right )} \sqrt {b \tan \left (d x + c\right ) + a} + {\left (d^{3} \sqrt {-\frac {9 \, a^{4} b^{2} - 6 \, a^{2} b^{4} + b^{6}}{d^{4}}} - {\left (3 \, a^{3} - a b^{2}\right )} d\right )} \sqrt {\frac {a^{3} - 3 \, a b^{2} + d^{2} \sqrt {-\frac {9 \, a^{4} b^{2} - 6 \, a^{2} b^{4} + b^{6}}{d^{4}}}}{d^{2}}}\right ) - 3 \, d \sqrt {\frac {a^{3} - 3 \, a b^{2} + d^{2} \sqrt {-\frac {9 \, a^{4} b^{2} - 6 \, a^{2} b^{4} + b^{6}}{d^{4}}}}{d^{2}}} \log \left (-{\left (3 \, a^{4} + 2 \, a^{2} b^{2} - b^{4}\right )} \sqrt {b \tan \left (d x + c\right ) + a} - {\left (d^{3} \sqrt {-\frac {9 \, a^{4} b^{2} - 6 \, a^{2} b^{4} + b^{6}}{d^{4}}} - {\left (3 \, a^{3} - a b^{2}\right )} d\right )} \sqrt {\frac {a^{3} - 3 \, a b^{2} + d^{2} \sqrt {-\frac {9 \, a^{4} b^{2} - 6 \, a^{2} b^{4} + b^{6}}{d^{4}}}}{d^{2}}}\right ) - 3 \, d \sqrt {\frac {a^{3} - 3 \, a b^{2} - d^{2} \sqrt {-\frac {9 \, a^{4} b^{2} - 6 \, a^{2} b^{4} + b^{6}}{d^{4}}}}{d^{2}}} \log \left (-{\left (3 \, a^{4} + 2 \, a^{2} b^{2} - b^{4}\right )} \sqrt {b \tan \left (d x + c\right ) + a} + {\left (d^{3} \sqrt {-\frac {9 \, a^{4} b^{2} - 6 \, a^{2} b^{4} + b^{6}}{d^{4}}} + {\left (3 \, a^{3} - a b^{2}\right )} d\right )} \sqrt {\frac {a^{3} - 3 \, a b^{2} - d^{2} \sqrt {-\frac {9 \, a^{4} b^{2} - 6 \, a^{2} b^{4} + b^{6}}{d^{4}}}}{d^{2}}}\right ) + 3 \, d \sqrt {\frac {a^{3} - 3 \, a b^{2} - d^{2} \sqrt {-\frac {9 \, a^{4} b^{2} - 6 \, a^{2} b^{4} + b^{6}}{d^{4}}}}{d^{2}}} \log \left (-{\left (3 \, a^{4} + 2 \, a^{2} b^{2} - b^{4}\right )} \sqrt {b \tan \left (d x + c\right ) + a} - {\left (d^{3} \sqrt {-\frac {9 \, a^{4} b^{2} - 6 \, a^{2} b^{4} + b^{6}}{d^{4}}} + {\left (3 \, a^{3} - a b^{2}\right )} d\right )} \sqrt {\frac {a^{3} - 3 \, a b^{2} - d^{2} \sqrt {-\frac {9 \, a^{4} b^{2} - 6 \, a^{2} b^{4} + b^{6}}{d^{4}}}}{d^{2}}}\right ) - 4 \, {\left (b \tan \left (d x + c\right ) + 4 \, a\right )} \sqrt {b \tan \left (d x + c\right ) + a}}{6 \, d} \]
[In]
[Out]
\[ \int \tan (c+d x) (a+b \tan (c+d x))^{3/2} \, dx=\int \left (a + b \tan {\left (c + d x \right )}\right )^{\frac {3}{2}} \tan {\left (c + d x \right )}\, dx \]
[In]
[Out]
Exception generated. \[ \int \tan (c+d x) (a+b \tan (c+d x))^{3/2} \, dx=\text {Exception raised: ValueError} \]
[In]
[Out]
Timed out. \[ \int \tan (c+d x) (a+b \tan (c+d x))^{3/2} \, dx=\text {Timed out} \]
[In]
[Out]
Time = 7.50 (sec) , antiderivative size = 1112, normalized size of antiderivative = 8.69 \[ \int \tan (c+d x) (a+b \tan (c+d x))^{3/2} \, dx=\text {Too large to display} \]
[In]
[Out]